<?php
// +----------------------------------------------------------------------
// | title: 物品日志
// +----------------------------------------------------------------------
// | Author: join
// +----------------------------------------------------------------------
// | Date: 2017/5/5 14:31
// +----------------------------------------------------------------------

$gainCodeArr = array(-999 => '-=行为类型=-') + getDiffConfig('origin');
// $itemTypeArr = include(__DIR__ . '/item_type_str.php');
// $itemTypeArr = include(__DIR__ . '/item_type_str.php');
$logTypeConfigArr = array(-999 => '-=日志类型=-') + getDiffConfig('log_type');
$configArr = config("operate_conf");
return array(
    1 => array(
        "title" => "物品日志",
        'table_name' => array("function" => "itemData"),
        "where" => array(
            "s_type" => array("type" => "select", "values" => $configArr, "value" => -999),
            'role_id' => array('name' => '玩家ID', "type" => "text", "value" => ""),
            'name' => array('name' => '角色名', "type" => "text", "value" => ""),
            "item_id" => array("name" => "道具名称/ID", "type" => "searchItem", "value" => ""),
            "type_str" =>array("name"=>"日志类型","type" => "select", "values" => $logTypeConfigArr, "value" => -999),
//            "origin" => array("type" => "select", "values" => $gainCodeArr, "value" => -999, "class" => "chosen_select"),
// //            'item_uuid' => array('name' => '唯一ID', "type" => "text", "value" => ""),
            'time' => array('name' => '时间', 'type' => 'date_time', 
            'values' => array('start_date' => date('Y-m-d 00:00:00'), 'end_date' => date('Y-m-d 23:59:59'))),
        ),
        "where_merge" => [],
        "export" => true,
        'show' => array(
            'role_id' => '玩家ID',
            'name' => '角色名',
            'item_id' => '物品ID',
//            'item_uuid' => '唯一ID',
            'item_name' => ['物品名称', "function" => "itemName", "param" => ["field" => "item_id", "config" => "item"]],
            'item_num' => "更新数量",
        //    'count' => "新数量",
            's_type' => ['操作类型', "function" => "GainTypeName","param" => ["field" => "s_type"]],
           'type' => '日志类型',
//            'origin' => array("行为类型", "function" => "gainName"),
            'type_str' => ['日志类型', "function" => "itemName", "param" => ["field" => "type_str", "config" => "log_type"]],
            'time' => array("时间", "function" => "changeDate"),
        )
    ),
);